export function setModel(state: any, nextState: any) {
	if (!nextState) {
		return state;
	}

	if (typeof nextState === 'function') {
		const _nextState = nextState(state);
		return _nextState || state;
	}

	return { ...state, ...nextState };
}
